package com.topcheer.common.datasource.annotation;

import com.topcheer.common.datasource.constants.DataSourceConstants;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author xutao
 * @Package com.topcheer.common.datasource.annotation
 * @Description: 数据源切换
 * @date 2020/4/3 10:33
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface DynamicSource {
    /**
     * 数据源类型，默认为读写
     * @return
     */
    String value() default DataSourceConstants.DATA_SOURCE_TYPE_READ_WRITE;

//    String dataSourceKey() ;
}
